package com.tancire.web.controller.app;

import com.tancire.common.annotation.Log;
import com.tancire.common.core.controller.BaseController;
import com.tancire.common.core.domain.AjaxResult;
import com.tancire.common.enums.BusinessType;
import com.tancire.works.domain.SideWorkEnroll;
import com.tancire.works.service.ISideWorkEnrollService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 兼职报名Controller
 *
 * @author tancire
 * @date 2024-03-11
 */
@RestController
@RequestMapping("/net/app/enroll")
public class SideWorkEnrollAppController extends BaseController {

    @Resource
    private ISideWorkEnrollService sideWorkEnrollService;

    /**
     * 新增兼职报名
     */
    @PreAuthorize("@ss.hasPermi('net:user:union')")
    @Log(title = "兼职报名", businessType = BusinessType.INSERT)
    @PostMapping("/add")
    public AjaxResult add(@RequestBody SideWorkEnroll sideWorkEnroll) {
        return toAjax(sideWorkEnrollService.insertSideWorkEnroll(sideWorkEnroll));
    }


}
